//
//  CoreDataManager.h
//  CoreData1135
//
//  Created by dllo on 16/3/8.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface CoreDataManager : NSObject
//临时数据库,数据管理器
//readonly(只读)只有getter方法.没有set方法.
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
//数据模型
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
//助手,数据管理助理
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

+(instancetype)shareInstance;
- (NSURL *)applicationDocumentsDirectory;
- (void)saveContext;
@end
